﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Cube : MonoBehaviour
{
    public GameObject prefab;
   void Update()
    {
        while (Input.GetMouseButtonDown(0))
        {
            prefab.GetComponent<MeshRenderer>().material.color = Color.red;
            prefab.GetComponent<MeshRenderer>().material.color = Color.green;
            prefab.GetComponent<MeshRenderer>().material.color = Color.blue;
            prefab.GetComponent<MeshRenderer>().material.color = Color.yellow;
        }

       
    }
}
